from selenium.webdriver.common.by import By

from wewrok_app_po.Base.wework_app import WeWorkApp



class PersonInfo(WeWorkApp):
    # 获取姓名
    _NAME = By.XPATH,"//*[@resource-id ='com.tencent.wework:id/khc']"
    _THREE =By.XPATH, "//*[@resource-id='com.tencent.wework:id/l6l']"
    def get_name(self,name):
        self.wait_for_text(self.driver,name)
        return self.find_and_text(*self._NAME)

    def goto_person_info_new(self):
        from wewrok_app_po.Page.person_info_new import PersonInfoNew
        # 点击右上角三个点
        self.find_and_click(*self._THREE)
        return PersonInfoNew(self.driver)